'\" t
.\"     Title: mkinitcpio
.\"    Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 2.0.21
.\"      Date: 2024-04-27
.\"    Manual: mkinitcpio manual
.\"    Source: \ \&
.\"  Language: English
.\"
.TH "MKINITCPIO" "8" "2024-04-27" "\ \&" "mkinitcpio manual"
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.ss \n[.ss] 0
.nh
.ad l
.de URL
\fI\\$2\fP <\\$1>\\$3
..
.als MTO URL
.if \n[.g] \{\
.  mso www.tmac
.  am URL
.    ad l
.  .
.  am MTO
.    ad l
.  .
.  LINKSTYLE blue R < >
.\}
.SH "NAME"
mkinitcpio \- Create an initial ramdisk environment
.SH "SYNOPSIS"
.sp
\fImkinitcpio\fP [options]
.SH "DESCRIPTION"
.sp
Creates an initial ramdisk environment for booting the Linux kernel. The
initial ramdisk is in essence a very small environment (early userspace) which
loads various kernel modules and sets up necessary things before handing over
control to init. This makes it possible to have, for example, encrypted root
file systems and root file systems on a software RAID array. mkinitcpio allows
for easy extension with custom hooks, has autodetection at runtime, and many
other features.
.SH "OPTIONS"
.sp
\fB\-A\fP, \fB\-\-addhooks\fP \fIhooks\fP
.RS 4
Add the additional \fIhooks\fP to the image. These will be processed in order
after all other hooks from the config file. Multiple hooks should be
comma\-separated. This option can be specified multiple times.
.RE
.sp
\fB\-c\fP, \fB\-\-config\fP \fIconfig\fP
.RS 4
Use \fIconfig\fP file to generate the ramdisk. Default: \fI/etc/mkinitcpio.conf\fP.
If specified, drop\-in files in \fI/etc/mkinitcpio.conf.d/\fP will be ignored.
.RE
.sp
\fB\-d\fP, \fB\-\-generatedir\fP \fIdirectory\fP
.RS 4
Set \fIdirectory\fP as the location where the initramfs is built. This might be
useful to generate a shutdown ramfs in \fI/run/initramfs/\fP.
.RE
.sp
\fB\-D\fP, \fB\-\-hookdir\fP \fIdirectory\fP
.RS 4
Set \fIdirectory\fP as the location where hooks will be searched for when
generating the image.
.RE
.sp
\fB\-g\fP, \fB\-\-generate\fP \fIfilename\fP
.RS 4
Generate a CPIO image as \fIfilename\fP. Default: no; this means nothing will be
written to the file system unless this option is specified.
.RE
.sp
\fB\-H\fP, \fB\-\-hookhelp\fP \fIhookname\fP
.RS 4
Output help for hookname \fIhookname\fP.
.RE
.sp
\fB\-h\fP, \fB\-\-help\fP
.RS 4
Output a short overview of available command\-line switches.
.RE
.sp
\fB\-k\fP, \fB\-\-kernel\fP \fIkernelversion\fP
.RS 4
Use \fIkernelversion\fP, instead of the current running kernel. This may be a
path to a kernel image (only supported for x86\-based architectures), a
specific kernel version or the special keyword \fInone\fP. In the latter case,
no kernel modules are added to the image.
.RE
.sp
\fB\-L\fP, \fB\-\-listhooks\fP
.RS 4
List all available hooks.
.RE
.sp
\fB\-M\fP, \fB\-\-automods\fP
.RS 4
Display modules found via autodetection. mkinitcpio will automatically try
to determine which kernel modules are needed to start your computer. This
option lists which modules were detected.
.RE
.sp
\fB\-n\fP, \fB\-\-nocolor\fP
.RS 4
Disable color output.
.RE
.sp
\fB\-U\fP, \fB\-\-uki\fP \fIfilename\fP
.RS 4
Generate a unified kernel image as \fIfilename\fP. If a CPIO image is
successfully built, it will be used to generate a unified kernel image for
UEFI booting. This combines the initramfs, the kernel, and the kernel
cmdline into one executable. This is useful for boot chain integrity where
the file is signed. Default: no.
For a list of relevant options see \fIOptions for unified kernel image\fP below.
.RE
.sp
\fB\-P\fP, \fB\-\-allpresets\fP
.RS 4
Process all presets contained in \fI/etc/mkinitcpio.d\fP. See the \fB\-p\fP option
for more detail about presets.
.RE
.sp
\fB\-p\fP, \fB\-\-preset\fP \fIpreset\fP
.RS 4
Build initramfs image(s) according to specified \fIpreset\fP. This may be a file
in /etc/mkinitcpio.d (without the .preset extension) or a full, absolute
path to a file. This option may be specified multiple times to process
multiple presets.
.RE
.sp
\fB\-R\fP, \fB\-\-remove\fP
.RS 4
Remove initramfs image(s) generated by the specified preset(s).
If used in combination with \fB\-P\fP|\fB\-\-allpresets\fP, removes the images for all
presets. This option can only be used with either \fB\-p\fP|\fB\-\-presets\fP or
\fB\-P\fP|\fB\-\-allpresets\fP.
.RE
.sp
\fB\-r\fP, \fB\-\-moduleroot\fP \fIroot\fP
.RS 4
Specifies the root directory to find modules in, defaulting to \fI/\fP.
.RE
.sp
\fB\-S\fP, \fB\-\-skiphooks\fP \fIhooks\fP
.RS 4
Skip \fIhooks\fP when generating the image. Multiple hooks should be
comma\-separated. This option can be specified multiple times.
.RE
.sp
\fB\-s\fP, \fB\-\-save\fP
.RS 4
Saves the build directory for the initial ramdisk. Default: no; This means
the directory will not be retained if this option is not specified. Useful
for debugging purposes.
.RE
.sp
\fB\-t\fP, \fB\-\-builddir\fP \fItmpdir\fP
.RS 4
Use \fItmpdir\fP as the temporary build directory instead of \fI/tmp\fP. \fItmpdir\fP
must exist. The \fITMPDIR\fP environment variable is also honored to set this
location, but the command line option will take precedence.
.RE
.sp
\fB\-V\fP, \fB\-\-version\fP
.RS 4
Display version information.
.RE
.sp
\fB\-v\fP, \fB\-\-verbose\fP
.RS 4
Verbose output. Outputs more information about what is happening during
creation of the ramdisk.
.RE
.sp
\fB\-z\fP, \fB\-\-compress\fP \fIcompress\fP
.RS 4
Override the compression method with the \fIcompress\fP program.
.RE
.SH "OPTIONS FOR UNIFIED KERNEL IMAGE"
.sp
\fB\-\-cmdline\fP \fIfilename\fP
.RS 4
Use kernel command line with unified kernel image. If none is specified,
try one of the files \fI/etc/kernel/cmdline\fP, \fI/usr/lib/kernel/cmdline\fP
or \fI/proc/cmdline\fP.
.RE
.sp
\fB\-\-no\-cmdline\fP
.RS 4
Omit embedding a kernel command line string in the unified kernel image.
Kernel command line options will need to be passed via the kernel command
line.
Overrides the \fB\-\-cmdline\fP option.
.RE
.sp
\fB\-\-splash\fP \fIfilename\fP
.RS 4
UEFI executables can show a bitmap file on boot.
.RE
.sp
\fB\-\-uefistub\fP \fIfilename\fP
.RS 4
UEFI stub image used for unified kernel image generation. Has no effect
if \fIukify\fP is being used.
Default: Attempts to look for a systemd\-boot or gummiboot
stub loader.
.RE
.sp
\fB\-\-ukiconfig\fP \fIfilename\fP
.RS 4
Configuration file to pass to \fIukify\fP. If none is specified, try one of the
files  \fI/etc/kernel/uki.conf\fP or \fI/usr/lib/kernel/uki.conf\fP. If neither of
those exists, \fIukify\fP will use its internal default.
.RE
.sp
\fB\-\-no\-ukify\fP
.RS 4
Do not use \fIukify\fP to build UKIs even if it is available. This is not
recommended.
.RE
.sp
\fB\-\-kernelimage\fP \fIfilename\fP
.RS 4
Include a kernel image for the unified kernel image. Default: one of
\fI/lib/modules/${KERNELVERSION}/vmlinuz\fP, \fI/boot/vmlinuz\-${KERNELVERSION}\fP,
or \fI/boot/vmlinuz\-linux\fP.
.RE
.sp
\fB\-\-osrelease\fP \fIfilename\fP
.RS 4
Include a os\-release file for the unified kernel image.
Default: \fI/etc/os\-release\fP or \fI/usr/lib/os\-release\fP.
.RE
.SH "ABOUT PRESETS"
.sp
A preset is a pre\-defined definition on how to create an initial ramdisk.
Instead of specifying the configuration file and which output file, every time
you generate a new initial ramdisk, you define a preset and use the \fB\-p\fP switch
to generate an initial ramdisk according to your preset.
.sp
Typically, presets are files located in \fI/etc/mkinitcpio.d/\fP with the extension
\fI.preset\fP, e.g. \fI/etc/mkinitcpio.d/linux.preset\fP for the \fBlinux\fP preset.
It is possible to use files in other locations, too. Then the path to this
file needs to be specified.
.sp
Presets files are shell scripts that get sourced by mkinitcpio and the following
variables will influence its behavior.
.sp
Note, that mkinitcpio calls itself for each preset and passes the options
defined in the preset file file via command line arguments. Those are mentioned
in the description of the options below, so refer to the manual of the command
line arguments for more information about a particular option.
.sp
\fBPRESETS\fP
.RS 4
An array of preset names defined in this file. These names will be
used as prefix to other options to provide preset\-specific options.
For example, if a
\fIPRESET=(\*(Aqcustom\*(Aq)\fP is given, then the image is specified via
\fIcustom_image=\*(Aq/boot/custom.img\*(Aq\fP.
.RE
.sp
\fB<preset>_kver\fP (defaults to value of \fBALL_kver\fP \(em one of the two is \fBrequired\fP)
.RS 4
Specify the Kernel version (via \fB\-k\fP in mkinitcpio).
.RE
.sp
\fB<preset>_config\fP (defaults to value of \fBALL_config\fP \(em one of the two is \fBrequired\fP)
.RS 4
Path to the configuration file (passed via \fB\-c\fP to mkinitcpio).
.RE
.sp
\fB<preset>_uki\fP (one of \fB<preset>_uki\fP and \fB<preset>_image\fP is \fBrequired\fP)
.RS 4
Output file path for a unified kernel image (passed via \fB\-U\fP to mkinitcpio).
.RE
.sp
\fB<preset>_image\fP (one of \fB<preset>_uki\fP and \fB<preset>_image\fP is \fBrequired\fP)
.RS 4
Output file path for the generated image (passed via \fB\-g\fP to mkinitcpio).
.RE
.sp
\fB<preset>_options\fP
.RS 4
Further command line arguments to pass to mkinitcpio as a string or array.
They will get appended at the end of the call to mkinitcpio (after all the
options mentioned above), so this can be used to overwrite options (for
example pass a \fB\-S\fP \fIhook\fP here to skip a hook).
.RE
.SH "ABOUT INSTALL HOOKS"
.sp
Install hooks are bash scripts which are sourced during mkinitcpio runtime in
order to add modules, binaries, and other files to the image. A variety of
functions exist to facilitate this.
.sp
\fBadd_module\fP \fImodname\fP
.RS 4
Adds the module specified by \fImodname\fP to the image. Dependencies are
derived and added automatically.
.RE
.sp
\fBadd_binary\fP \fIbinary\fP [ \fIdestination\fP ] [ \fImode\fP ]
.RS 4
Adds a binary to the image. The argument \fIbinary\fP need not be an absolute
path and, if needed, a lookup will be performed. If the binary is a
dynamically linked ELF binary, dependencies will be automatically added. If
it is a symlink, both the symlink and the target binary will be added.
Optionally, a destination within the initramfs image as well as a file mode
can be specified. By default, the destination and mode be taken from the
source derived from \fIbinary\fP.
.RE
.sp
\fBadd_file\fP \fIpath\fP [ \fIdestination\fP ] [ \fImode\fP ]
.RS 4
Adds a file and any needed parent directories to the image. If it is a
symlink, both the symlink and the target file will be added. Optionally, a
destination within the initramfs image as well as a file mode can be
specified. By default, the destination and mode will be taken from the
source and mode of the file specified by the \fIpath\fP.
.RE
.sp
\fBadd_file_early\fP \fIpath\fP [ \fIdestination\fP ] [ \fImode\fP ]
.RS 4
Adds a file and any needed parent directories to the early uncompressed
image. Works the same way as \fBadd_file\fP.
.RE
.sp
\fBadd_dir\fP \fIpath\fP
.RS 4
Adds a directory and its parents to the image.
.RE
.sp
\fBadd_dir_early\fP \fIpath\fP
.RS 4
Adds a directory and its parents to the early uncompressed image. Works the
same way as \fBadd_dir\fP.
.RE
.sp
\fBadd_full_dir\fP \fIdirectory\fP [ \fIglob\fP ] [ \fIstrip_prefix\fP ]
.RS 4
Recursively adds a directory to the image by walking the given path and
calling \fBadd_file\fP, \fBadd_dir\fP, and \fBadd_symlink\fP accordingly. This function
will not follow symlinks, nor will it add the targets of symlinks.

.br
If the \fIglob\fP argument is passed, only files and symlinks matching this glob
will be added.

.br
If the \fIstrip_prefix\fP argument is passed, it will be used to strip the
destination path (path in the initramfs image) from the prefix specified by
the \fIstrip_prefix\fP argument. This can be useful when writing rootfs\-overlay
hooks.
.RE
.sp
\fBadd_symlink\fP \fIpath\fP [ \fIlink\-target\fP ]
.RS 4
Adds a symlink to the image at the specified \fIpath\fP, optionally pointing to
the specified \fIlink\-target\fP. If the \fIlink\-target\fP is not provided, it is
assumed that this symlink exists in the real file system, and the target
will be read using \fBreadlink\fP(1). There is no checking done to ensure that
the target of the symlink exists, and symlinks will not be followed
recursively.
.RE
.sp
\fBadd_all_modules\fP [ \fB\-f\fP \fIfilter\fP ] \fIpattern\fP
.RS 4
Adds modules to the image, without regard for the autodetect whitelist.
\fIpattern\fP should be a subdirectory within the kernel tree describing a
subset of modules to be included. Further refinement can be provided via
the \fB\-f\fP flag with an extended regular expression.
.RE
.sp
\fBadd_checked_modules\fP [ \fB\-f\fP \fIfilter\fP ] \fIpattern\fP
.RS 4
Similar to \fBadd_all_modules\fP with the constraint that only modules matching
the whitelist generated by the autodetect hook will be added to the image.
If the autodetect hook is not present in the image, this function is
identical to \fBadd_all_modules\fP.
.RE
.sp
\fBadd_runscript\fP \fIscriptname\fP
.RS 4
Adds a runtime hook to the image, which is a busybox ash compatible shell
script. The name of the script is guaranteed to match the name of the hook
the script is called from.
.RE
.sp
\fBadd_udev_rule\fP \fIrule\-file\fP
.RS 4
Adds a udev rule to the image. Dependencies on binaries will be discovered
and added. The argument can be a rule file name (discovered from well known
udev paths) or an absolute path.
.RE
.sp
\fBadd_all_modules_from_symbol\fP \fIsymbol\fP \fIpaths\fP
.RS 4
Adds modules from the \fIpaths\fP directories containing the \fIsymbol\fP to the
image.
.RE
.sp
\fBadd_checked_modules_from_symbol\fP \fIsymbol\fP \fIpaths\fP
.RS 4
Similar to \fBadd_all_modules_from_symbol\fP with the constraint that only
modules matching the whitelist generated by the autodetect hook will be
added to the image. If the autodetect hook is not present in the image, this
function is identical to \fBadd_all_modules_from_symbol\fP.
.RE
.SH "ABOUT EARLY CPIO"
.sp
mkinitcpio has support for early CPIO. These are uncompressed CPIO archives
prepended to the main compressed CPIO archive. They are used for early loading
CPU microcode or loading ACPI table overrides.
.sp
Install hooks can install files to this archive by adding them to \fI$EARLYROOT\fP.
.SH "ABOUT RUNTIME HOOKS"
.sp
Runtime hooks added to the image via the \fBadd_runscript\fP function from an
install hook are able to provide extra functionality during early userspace.
Specific functions in these files will run at different times. A hook can
define one or more of these. At each hook point, hooks are run in the order
that they are defined in the HOOKS variable, except for cleanup hooks which are
run in reverse.
.sp
\fBrun_earlyhook\fP
.RS 4
Functions of this name will be run once the API mounts have been setup and
the kernel command line has been parsed. Daemons needed for early userspace
should be started from this hook point.
.RE
.sp
\fBrun_hook\fP
.RS 4
Functions of this name will be run after any early hooks, and after user
defined modules have been installed. This is the most common hook point, and
functionality such as scanning for LVM volumes and mapping encrypted volumes
should be performed here.
.RE
.sp
\fBrun_latehook\fP
.RS 4
Functions of this name will be run after root has been mounted. This is
generally used for further necessary setup in the real root, such as
mounting other system partitions.
.RE
.sp
\fBrun_cleanuphook\fP
.RS 4
Functions of this name are run as late as possible. Any daemons started
from a \fBrun_earlyhook\fP function should be shut down here in preparation for
switching to the real root.
.RE
.sp
\fBrun_emergencyhook\fP
.RS 4
Functions of this name are run before the emergency shell launched in case
of boot failure. For example this allows boot splash screens to terminate
their process, so users will notice the failure.
.RE
.sp
\fBgetarg\fP \fIargument\fP [ \fIdefault\fP ]
.RS 4
This function can be used in runtime hooks to get an argument from the
kernel cmdline. If \fIargument\fP exists with a value, the value is returned. If
\fIargument\fP exists without a value, \fIy\fP is returned. If \fIargument\fP does not
exist, \fIdefault\fP is returned. If \fIdefault\fP is not specified, nothing is
returned.
.RE
.SH "ABOUT POST HOOKS"
.sp
Post hooks are executables or scripts that get executed after the image has been
successfully generated and can be used for further processing (i.e. signing).
They receive the kernel as the first argument, the image as second and
optionally the unified kernel image as a third.
.sp
Note that the first argument will be empty when the mkinitcpio has been invoked
with \fB\-k\fP \fInone\fP or \fB\-k\fP \fIversion\fP and the kernel image cannot be found on the
file system.
.sp
The following enviroment variables are passed:
.sp
\fBKERNELVERSION\fP
.RS 4
Contains the full version of the kernel the image has been built from.
.RE
.sp
\fBKERNELDESTINATION\fP
.RS 4
The default location where the kernel should be located for booting. This
usually is the same as the first argument but might differ if mkinitcpio has
not been invoked with \fB\-k\fP \fI/boot/*\fP. If no kernel image has been found this
variable will be empty as well.
.RE
.SH "EARLY INIT ENVIRONMENT"
.sp
mkinitcpio gives special treatment to certain environment variables passed on
the kernel command line:
.sp
\fBbreak\fP[=\fI<premount|postmount>\fP]
.RS 4
If specified, mkinitcpio will start a shell during early init. The optional
parameter controls when this occurs: when \fIpremount\fP or no parameter are
specified, the shell will be launched prior to mounting root. If \fIpostmount\fP
is specified, the shell will be launched after mounting root.
.RE
.sp
\fBdisablehooks=\fP\fIhooklist\fP
.RS 4
This is a comma separated list of hooks which will be skipped during early
init.
.RE
.sp
\fBearlymodules=\fP\fImodulelist\fP
.RS 4
This is a comma separated list of modules which will be loaded prior to any
others. This is generally not needed, and usually points to a configuration
or kernel problem.
.RE
.sp
\fBquiet\fP
.RS 4
Causes mkinitcpio to output fewer messages during boot. Errors will not be
suppressed.
.RE
.sp
\fBro\fP
.RS 4
Specifies that root should be mounted with readonly permissions. This is the
default behavior.
.RE
.sp
\fBrw\fP
.RS 4
Specifies that root should be mounted with readwrite permissions. This is
generally only useful if your initramfs uses the \fIfsck\fP hook.
.RE
.sp
\fBroot=\fP\fIrootdevice\fP
.RS 4
This variable describes the root partition which early init will mount
before passing control to the real init. mkinitcpio understands a variety of
formats, the most basic of which is the path to the block device, either
directly such as \fI/dev/sda2\fP, or using a udev symlink such as
\fI/dev/disk/by\-label/CorsairF80\-root\fP. Support for identification by LABEL or
UUID tags are also supported, such as, \fILABEL=CorsairF80\-root\fP. As of
util\-linux 2.22, PARTUUID and PARTLABEL are also supported. Identification
via hex encoded major/minor device ID is supported for legacy reasons, but
should be avoided as it tends to be fragile.
.RE
.sp
\fBrootdelay\fP[=\fIseconds\fP]
.RS 4
Sets the delay, in seconds, that mkinitcpio is willing to wait for the root
device to show up, if it is not available immediately. This defaults to \fI10\fP
seconds. If an invalid integer is passed, this variable will have no effect.
.RE
.sp
\fBrootflags=\fP\fIflaglist\fP
.RS 4
A comma\-separated list of flags which will be passed onto the \fBmount\fP(8)
command when mounting the root file system. Acceptable values are file
system specific.
.RE
.sp
\fBrootfstype=\fP\fIfstype\fP
.RS 4
Overrides the type of file system being mounted as root. This should almost
never be needed as \fBmount\fP(8) usually detects this on its own.
.RE
.sp
\fBrd.debug\fP
.RS 4
Enables shell debug (xtrace). If \fIrd.log\fP is not also a parameter on the
kernel command line, this parameter implies \fIrd.log=console\fP.
.RE
.sp
\fBrd.log\fP[\fI=<console|file|kmsg|all>\fP]
.RS 4
Enables logging of early userspace messages. If specified, the optional
parameter describes where this information is logged. Multiple options can
be \fBOR\fP\-d together using the pipe (|) character. Messages are always
logged to the console unless the \fIquiet\fP parameter is passed. If the
optional parameter is not specified, \fIkmsg|console\fP is assumed. If \fIrd.log\fP
is not present on the kernel command line, no logging will take place.
.br
.sp
\fBconsole\fP
.RS 4
Writes output to \fI/dev/console\fP.
.RE
.sp
\fBfile\fP
.RS 4
Writes output to \fI/run/initramfs/init.log\fP.
.RE
.sp
\fBkmsg\fP
.RS 4
Writes output to the \fI/dev/kmsg\fP device (introduced in Linux 3.5). This
option is a no\-op if your kernel lacks support for \fI/dev/kmsg\fP.
.RE
.sp
\fBall\fP
.RS 4
Writes output to all known log targets.
.RE
.RE
.sp
These are only the variables that the core of mkinitcpio honor. Additional
hooks may look for other environment variables and should be documented by the
help output for the hook.
.SH "REPRODUCIBILITY"
.sp
mkinitcpio aims to create reproducible initramfs images by default.
.sp
This means that two subsequent runs of mkinitcpio should produce two files
that are identical at the binary level.
.sp
Timestamps within the initramfs are set to the Unix epoch of 1970\-01\-01.
.sp
Note that in order for the build to be fully reproducible, the compressor
specified (e.g. gzip, xz) must also produce reproducible archives. At the time
of writing, as an inexhaustive example, the lzop compressor is incapable of
producing reproducible archives due to the insertion of a runtime timestamp.
.sp
More information can be found at \c
.URL "https://reproducible\-builds.org" "" "."
.SH "FILES"
.sp
\fI/etc/mkinitcpio.conf\fP
.RS 4
Default configuration file for mkinitcpio.
.RE
.sp
\fI/etc/mkinitcpio.conf.d\fP
.RS 4
Directory containing drop\-in configuration files.
.RE
.sp
\fI/etc/mkinitcpio.d\fP
.RS 4
Directory containing mkinitcpio presets.
.RE
.sp
\fI/etc/initcpio/install\fP, \fI/usr/lib/initcpio/install\fP
.RS 4
Search path for build time hooks.
.RE
.sp
\fI/etc/initcpio/hooks\fP, \fI/usr/lib/initcpio/hooks\fP
.RS 4
Search path for early userspace runtime hooks.
.RE
.sp
\fI/etc/initcpio/post\fP, \fI/usr/lib/initcpio/post\fP
.RS 4
Search path for post generation hooks.
.RE
.SH "EXAMPLES"
.sp
\fBmkinitcpio\fP
.RS 4
Perform a dry\-run. This will generate an initial ramdisk but will not
write anything. Use \fB\-g\fP to create the real image.
.RE
.sp
\fBmkinitcpio \-p linux\fP
.RS 4
Create an initial ramdisk based on the \fIlinux\fP preset.
.RE
.sp
\fBmkinitcpio \-g /boot/initramfs\-linux.img \-k /boot/vmlinuz\-linux\fP
.RS 4
Create an initial ramdisk for the kernel at /boot/vmlinuz\-linux. The
resulting image will be written to /boot/initramfs\-linux.img.
.RE
.sp
\fBmkinitcpio \-U /efi/EFI/Linux/systemd\-linux.efi\fP
.RS 4
Create an initial ramdisk for the kernel along with a unified kernel image.
The resulting executable will be written to
\fI/efi/EFI/Linux/systemd\-linux.efi\fP.
.RE
.sp
\fBmkinitcpio \-U /efi/EFI/Linux/systemd\-linux.efi \-\-splash /usr/share/systemd/bootctl/splash\-arch.bmp\fP
.RS 4
Create an initial ramdisk for the kernel and a unified kernel image. This
also includes a splash image which will be used during boot.
.RE
.SH "SEE ALSO"
.sp
A more thorough article on configuring mkinitcpio:
.URL "https://wiki.archlinux.org/title/mkinitcpio" "" ""
.sp
\fBinitrd\fP(4), \fBlsinitcpio\fP(1), \fBmkinitcpio.conf\fP(5), \fBbootparam\fP(7)
.SH "BUGS"
.sp
Upon writing this man page, there were no noticeable bugs present. Please visit
.URL "https://gitlab.archlinux.org/archlinux/mkinitcpio/mkinitcpio/\-/issues" "" ""
for an
up to date list.
.SH "AUTHORS"
.sp
mkinitcpio is maintained by the Arch Linux community. Refer to the \fIAUTHORS\fP
file for a full list of contributors.
.SH "COPYRIGHT"
.sp
Copyright 🄯 mkinitcpio contributors. GPL\-2.0\-only.